'use strict';
/**
 * Created by deng on 16-1-19.
 */
angular.module('metalabOperationApp').config(['$stateProvider', function ($stateProvider) {

    $stateProvider
        .state('meta.permission.technology', {
            url: '/technology',
            abstract: true,
            views: {
                'content': {
                    templateUrl: 'views/permission/common/content.html'
                }
            }
        }).state('meta.permission.technology.technology', {
            url: '/technology',
            abstract: true
        }).state('meta.permission.technology.technology.list', {
            url: '/list?area&rank&origin&manager&state&page&sort&technologyForm&search&value&showAll',
            views: {
                'header@meta.permission.technology': {
                    templateUrl: 'views/permission/technology/header.html',
                    controller: 'HeaderCtrl'
                },
                'body@meta.permission.technology': {
                    templateUrl: 'views/permission/technology/technology/index.html',
                    controller: 'TechListCtrl'
                },
                'page@meta.permission.technology.technology.list': {
                    templateUrl: 'views/permission/common/page.html'
                },
                //filter
                'meta-area-control@meta.permission.technology.technology.list': {
                    templateUrl: 'views/permission/filter/area.html'
                },
                'meta-rank-control@meta.permission.technology.technology.list': {
                    templateUrl: 'views/permission/filter/rank.html'
                },
                'meta-origin-control@meta.permission.technology.technology.list': {
                    templateUrl: 'views/permission/filter/origin.html'
                },
                'meta-manager-control@meta.permission.technology.technology.list': {
                    templateUrl: 'views/permission/filter/manager.html'
                },
                'meta-state-control@meta.permission.technology.technology.list': {
                    templateUrl: 'views/permission/filter/techState.html'
                },
                'meta-upload-control@meta.permission.technology.technology.list': {
                    templateUrl: 'views/permission/filter/upload.html'
                },
                'meta-created-control@meta.permission.technology.technology.list': {
                    templateUrl: 'views/permission/filter/created.html'
                },
                'meta-verified-control@meta.permission.technology.technology.list': {
                    templateUrl: 'views/permission/filter/verified.html'
                },
                //search
                'meta-search@meta.permission.technology.technology.list': {
                    templateUrl: 'views/permission/common/search.html'
                }
            }
        }).state('meta.permission.technology.technology.detail', {
            url: '/detail/:id',
            views: {
                'header@meta.permission.technology': {
                    templateUrl: 'views/permission/technology/header.html',
                    controller: 'HeaderCtrl'
                },
                'body@meta.permission.technology': {
                    templateUrl: 'views/permission/common/detail.html',
                    controller: 'TechDetailEditCtrl'
                },
                'edit@meta.permission.technology.technology.detail':{
                    templateUrl: 'views/permission/technology/edit.html'
                },
                'control@meta.permission.technology.technology.detail':{
                    templateUrl: 'views/permission/technology/control.html'
                },
                'comment@meta.permission.technology.technology.detail':{
                    templateUrl: 'views/permission/common/comment.html'
                }
            }
        }).state('meta.permission.technology.solution', {
            url: '/solution',
            abstract: true
        }).state('meta.permission.technology.solution.list', {
            url: '/list?area&manager&page&sort&search&value',
            views: {
                'header@meta.permission.technology': {
                    templateUrl: 'views/permission/demand/header.html',
                    controller: 'HeaderCtrl'
                },
                'body@meta.permission.technology': {
                    templateUrl: 'views/permission/technology/solution/index.html',
                    controller: 'TechListCtrl'
                },
                'page@meta.permission.technology.solution.list': {
                    templateUrl: 'views/permission/common/page.html'
                },
                //filter
                'meta-area-control@meta.permission.technology.solution.list': {
                    templateUrl: 'views/permission/filter/area.html'
                },
                'meta-manager-control@meta.permission.technology.solution.list': {
                    templateUrl: 'views/permission/filter/manager.html'
                },
                //search
                'meta-search@meta.permission.technology.solution.list': {
                    templateUrl: 'views/permission/common/search.html'
                }
            }
        }).state('meta.permission.technology.solution.detail', {
            url: '/detail/:id',
            views: {
                'header@meta.permission.technology': {
                    templateUrl: 'views/permission/demand/header.html',
                    controller: 'HeaderCtrl'
                },
                'body@meta.permission.technology': {
                    templateUrl: 'views/permission/common/detail.html',
                    controller: 'TechDetailEditCtrl'
                },
                'edit@meta.permission.technology.solution.detail':{
                    templateUrl: 'views/permission/technology/edit.html'
                },
                'control@meta.permission.technology.solution.detail':{
                    templateUrl: 'views/permission/technology/control.html'
                },
                'comment@meta.permission.technology.solution.detail':{
                    templateUrl: 'views/permission/common/comment.html'
                }
            }
        });

}]);
